package com.xjl.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : xjl
 * @date : 2023-07-28
 **/
@RestController
public class HelloController {
    @RequestMapping("/hello")
//    @PreAuthorize("hasAuthority('system:dept:list')")
//    @PreAuthorize("hasAnyAuthority('system:dept:list','admin','test')")
//    @PreAuthorize("hasRole('system:dept:list')")

    //这个是自定义的权限校验用的是SPEL表达式
//    @PreAuthorize("@ex.hasAuthority('system:dept:list')")
    public String hello(){
        return "hello";
    }
}
